package org.zjt.spark.book

import org.apache.spark.{SparkConf, SparkContext}
import org.apache.spark.mllib.feature.{HashingTF, IDF}
import org.zjt.spark.book.EmailClassification.sc

/**
  * Created by Administrator on 2017/7/1.
  */
object TFIDF extends App{
  var sparkConf = new SparkConf().setMaster("local[2]").setAppName("EmailClassification")
  val sc = new SparkContext(sparkConf)

  // tf转化器
  val tf:HashingTF = new HashingTF(1000)
  val df = new IDF()

  val normal = sc.textFile("D:\\Idea workspace\\scala-demo\\src\\main\\resource\\mllib\\nomal.txt")


  //tf.transform()

}
